<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/marked.min.js"></script>
    <!-- MarkDown代码高亮 -->
    <link rel="stylesheet"
      href="./css/default.min.css">
      <script src="./js/highlight.min.js"></script>
    
      <link rel="stylesheet" href="./css/styles.css">
</head>
<body>

    <!-- 头部导航栏 -->
    <div class="head_navigation">
        <div>长白崎的个人博客</div>
    </div>

<!--左侧方用户导航栏  -->
    <div class="left_user_navigation">
        <img src="./images/QQ头像.jpg">
        <div id="name">长白崎</div>
        <ul>
            <li>关注</li>
            <li>首页</li>
            <li>私聊</li>
        </ul>
    </div>
    <!-- 左侧边导航栏 -->
    <div class="left_navigation">
        <ul>
            <li><img src="./images/主页.png"><span>返回主页</span></li>
            <li><img src="./images/帮助.png"><span>待加功能</span></li>
            <li><img src="./images/帮助.png"><span>待加功能</span></li>
        </ul>
    </div>

    <!-- 主体内容 -->

    <div id="main" class="main">
        # 测试
    </div>

    <!-- 底部信息 -->
    <div class="bottom">

    </div>
</body>
<script>
    //初始化MarkDown代码高亮
    hljs.initHighlightingOnLoad();
    //获取对应要展示的MarkDown的控件
    let markdown = document.getElementById('main');
    //加载MarkDown


    markdown.innerText = load("./assets/SpringBoot学习笔记.md");
    markdown.innerHTML = marked(markdown.innerText);


    function load(name) {
    let xhr = new XMLHttpRequest(),
        okStatus = document.location.protocol === "file:" ? 0 : 200;
    xhr.open('GET', name, false);
    xhr.overrideMimeType("text/html;charset=utf-8");//默认为utf-8
    xhr.send(null);
    return xhr.status === okStatus ? xhr.responseText : null;
    }

</script>
</html>